// component/parkView/parkView.js
// const ajax = require("../../utils/index")
import ajax from "../../utils/index"
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    item: Object,
    videoPlay: Boolean
  },

  /**
   * 组件的初始数据
   */
  data: {
    swiperIndex: 0
  },

  /**
   * 组件的方法列表
   */
  methods: {
    videoEvent () {
      this.triggerEvent('video')
    },
    swiperChange (event) {
      this.setData({ swiperIndex: event.detail.current })
    },
    locationEvent() {
      ajax.openMmap(this.data.item.address)
    },
    navigateTo() {
      wx.navigateTo({
        url: '/pagesEnterprise/pages/parkDetails/parkDetails?id=' + this.data.item.id
      })
    }
  }
})
